import { BasicPageParams, BasicFetchResult } from '@/api/model/baseModel';

export interface PageInfo {
  id: number;
  template_id: number;
  name: string;
  type: string; // show（展示页）、content（内容，动态页面）
  html: string;
  url: string;
  is_show: boolean;
  sort: number;
  status: number; // 10代表active，20代表inactive
}

export interface PageParams extends BasicPageParams {
  name?: string;
  type?: string;
  template_id?: number;
  status?: number;
}

export interface PageListGetResultModel extends BasicFetchResult<PageInfo> {}

// Request Types
export interface PageAddReq {
  template_id: number;
  name: string;
  type: string;
  html: string;
  url: string;
  is_show: boolean;
  sort: number;
  status: number;
}

export interface PageEditReq extends PageAddReq {
  id: number;
}

export interface PageDelReq {
  id: number;
}
